Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <head> <style> div { background-image: url('smiley.gif'); background-repeat: no-repeat; width: 400px; height: 400px; border: 1px solid #000000; } </style> </head> <body> <button type="button" onclick="myFunction()">Position background image</button> <br> <div id="myDiv"> </div> <script> function myFunction() { document.getElementById("myDiv").style.backgroundPosition = "center bottom"; } </script> </body> <!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_style_backgroundposition2 by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 08:24:50 GMT --> </html>
Result:
Try it Yourself - © w3schools.com